#ifndef MAPPLICATION_HPP
#define MAPPLICATION_HPP

#include <vector>
#include <memory>

#include "Window.hpp"
#include "Texture.hpp"

namespace MA {

class AbstractState;

class Application : public Window
{
public:
    Application(int width, int height, std::string title = "");
    ~Application();

	int run();

	void update();

	void sleep(uint32_t ms);

	void setRunning(bool running);
    bool isRunning() const;

	void pushState(AbstractState* state);
	void popState();

private:
/*
    void loadResources();

    virtual void onMouseDown(uint8_t buttonIndex, int32_t mousePosX, int32_t mousePosY);
	virtual void onWindowQuit();

    MTexture* m_bgTexture;
    MTexture* m_textureO;
    MTexture* m_textureX;
*/
    bool m_running;

	std::vector<AbstractState*> m_states;
};

}
#endif // MAPPLICATION_HPP
